<!--病假管理-->
<template>
  <div class="log">
    <basic-container>
      <!--选项卡-->
      <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
        <el-tab-pane label="审批中" name="first"></el-tab-pane>
        <el-tab-pane label="已通过" name="second"></el-tab-pane>
        <el-tab-pane label="已驳回" name="third"></el-tab-pane>
        <el-tab-pane label="已撤销" name="fourth"></el-tab-pane>
        <el-tab-pane label="已销假" name="fifth"></el-tab-pane>
      </el-tabs>
      <!--表格-->
      <avue-crud
          ref="crud"
          :data="tableData"
          :option="tableOption"
          :page.sync="page"
          @on-load="getList"
          :table-loading="tableLoading"
          @search-reset="searchReset"
          @search-change="searchChange"
          @size-change="sizeChange"
          @sort-change="sortChange"
          @current-change="currentChange">
        <template slot="leaveStatus" slot-scope="scope">
          <el-tag  v-if="scope.row.leaveStatus === 0" type="primary">{{ scope.label }}</el-tag>
          <el-tag  v-else-if="scope.row.leaveStatus === 1" type="success">{{ scope.label }}</el-tag>
          <el-tag  v-else-if="scope.row.leaveStatus === 2" type="danger">{{ scope.label }}</el-tag>
          <el-tag  v-else-if="scope.row.leaveStatus === 3" type="info">{{ scope.label }}</el-tag>
          <el-tag  v-else type="info">{{ scope.label }}</el-tag>
        </template>
        <template slot="buildingName" slot-scope="scope">
          <p v-if="scope.row.buildingName == ''">无</p>
          <p v-else-if="scope.row.buildingName == null">无</p>
          <p v-else>{{scope.row.buildingName}}</p>
        </template>
        <template slot="menu" slot-scope="scope">
          <!--自定义查看按钮-->
          <el-button
              class="filter-item"
              icon="el-icon-view"
              size="small"
              type="primary"
              @click="handle(scope.row)">查看
          </el-button>
        </template>
      </avue-crud>
      <!--查看审批弹窗-->
      <el-dialog
          :visible.sync="dialogEditVisible"
          title="查看审批"
          width="40%"
          @close="dictItemVisible"
          :close-on-click-modal="false">
        <el-form>
          <!--第一个框基础信息-->
          <el-form-item style="border-radius: 10px;padding: 10px 0 10px 30px;box-shadow: 0 0 5px 2px #e5e5e5;">
            <el-col :span="12">
              <p style="margin: 0">姓名：{{this.name}}</p>
            </el-col>
            <el-col :span="12">
              <p style="margin: 0" v-if="this.sex === 0">性别：女</p>
              <p style="margin: 0" v-if="this.sex === 1">性别：男</p>
            </el-col>
            <el-col :span="12">
              <p style="margin: 0">年级：{{this.gradeName}}</p>
            </el-col>
            <el-col :span="12">
              <p style="margin: 0">班级：{{this.className}}</p>
            </el-col>
            <el-col :span="12">
              <p style="margin: 0">属性：{{this.identity}}</p>
            </el-col>
            <el-col :span="12">
              <p v-if="this.number == null" style="margin: 0">学号：无</p>
              <p v-else style="margin: 0">学号：{{this.number}}</p>
            </el-col>
          </el-form-item>

          <!--第二个框请假信息-->
          <el-form-item style="border-radius: 10px;padding: 10px 0 10px 30px;box-shadow: 0 0 5px 2px #e5e5e5;">
            <el-col :span="12">
              <p style="margin: 0">当前状态：{{this.leaveStatus}}</p>
            </el-col>
            <el-col :span="12">
              <p style="margin: 0">请假发起人：{{this.createUser}}</p>
            </el-col>
            <el-col :span="12">
              <p v-if="this.eye === false" style="margin: 0">发起人电话：{{this.linkPhone}}
                <i class="icon-huabanfuben" style="margin:0 0 0 10px;font-size: 15px!important;" @click="showPhone"/>
              </p>
              <p style="margin: 0" v-else>发起人电话：{{this.linkPhone1}}
                <i class="icon-yanjing1" style="margin:0 0 0 10px;font-size: 15px!important;" @click="showPhone"/>
              </p>
            </el-col>
            <el-col :span="12">
              <p style="margin: 0">发起时间：{{this.createTime}}</p>
            </el-col>
            <el-col :span="12">
              <p style="margin: 0">请假类型：{{this.leaveType}}</p>
            </el-col>
            <el-col :span="12">
              <p style="margin: 0">请假开始时间：{{this.startTime}}</p>
            </el-col>
            <el-col :span="12">
              <p style="margin: 0">请假结束时间：{{this.endTime}}</p>
            </el-col>
            <el-col :span="11">
              <p style="margin: 0">请假理由：{{this.cause}}</p>
            </el-col>
          </el-form-item>

          <!--第三个框审批状态-->
          <el-form-item style="border-radius: 10px;padding: 10px 0 10px 30px;box-shadow: 0 0 5px 2px #e5e5e5;">
            <el-col :span="24">
              <p style="margin: 0" v-if="this.doctorApprove === 0">校医审批结果：待审</p>
              <p style="margin: 0" v-if="this.doctorApprove === 1">校医审批结果：通过</p>
              <p style="margin: 0" v-if="this.doctorApprove === 2">校医审批结果：驳回</p>
              <p style="margin: 0" v-if="this.doctorApprove === 3">校医审批结果：中断</p>
            </el-col>
            <!--当校医审批结果为待审时显示-->
            <div v-if="this.doctorApprove === 0">
              <el-col :span="24" style="display: none">
                <p style="margin: 0">校医审批时间：{{this.doctorApproveTime}}</p>
              </el-col>
              <el-col :span="24" style="display: none">
                <p style="margin: 0">校医审批反馈：{{this.doctorApproveAdvice}}</p>
              </el-col>
            </div>
            <!--当校医审批结果为中断时显示-->
            <div v-else-if="this.doctorApprove === 3">
              <el-col :span="24" style="display: none">
                <p style="margin: 0">校医审批时间：{{this.doctorApproveTime}}</p>
              </el-col>
              <el-col :span="24" style="display: none">
                <p style="margin: 0">校医审批反馈：{{this.doctorApproveAdvice}}</p>
              </el-col>
            </div>
            <!--当校医审批结果为其他状态时显示-->
            <div v-else>
              <el-col :span="24">
                <p style="margin: 0">校医审批时间：{{this.doctorApproveTime}}</p>
              </el-col>
              <el-col :span="23">
                <p style="margin: 0">校医审批反馈：{{this.doctorApproveAdvice}}</p>
              </el-col>
            </div>
          </el-form-item>

          <!--第四个框审批-->
          <!--当前状态为审批中时显示-->
          <el-form-item v-if="this.leaveStatus === '审批中'" style="border-radius: 10px;padding: 10px 0 10px 30px;box-shadow: 0 0 5px 2px #e5e5e5;">
            <el-col :span="12" :property="endt">
              <span>结束时间</span>
              <avue-date
                  v-model="endt"
                  type="datetime"
                  format="yyyy-MM-dd HH:mm"
                  placeholder="请选择结束时间"
                  value-format="yyyy-MM-dd HH:mm:ss"
                  style="display: inline-block;margin-left: 15px">
              </avue-date>
            </el-col>
            <el-col :span="12" :property="createUser">
              <span>审批人</span>
              <el-select v-model="value" placeholder="请选择" style="display: inline-block;margin-left: 15px">
                <el-option
                    v-for="item in userOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value">
                </el-option>
              </el-select>
            </el-col>
            <el-col :span="19" :property="doctorApproveAdvice">
              <span style="position: absolute;margin-top: 6px">审批反馈</span>
              <el-input
                  v-model="doctorApproveAdvice"
                  type="textarea"
                  :rows="4"
                  placeholder="请输入审批反馈"
                  style="position: relative;left:56px;top:6px;margin-left: 15px">
              </el-input>
            </el-col>
            <el-col :span="24" style="text-align: center;margin-top: 20px">
              <el-button
                  size="small"
                  type="primary"
                  @click="adopt">通过
              </el-button>
              <el-button
                  size="small"
                  type="danger"
                  @click="reject">驳回
              </el-button>
            </el-col>
          </el-form-item>

          <!--当前状态为已通过时显示-->
          <el-form-item v-else-if="this.leaveStatus === '已通过'" style="border-radius: 10px;padding: 10px 0 10px 30px;box-shadow: 0 0 5px 2px #e5e5e5;">
            <el-col :span="12" :property="createUser">
              <span>销假人</span>
              <el-select v-model="value" placeholder="请选择" style="display: inline-block;margin-left: 30px">
                <el-option
                    v-for="item in userOptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value">
                </el-option>
              </el-select>
            </el-col>
            <el-col :span="19" :property="cancelApproveAdvice">
              <span style="position: absolute;margin-top: 6px">销假反馈</span>
              <el-input
                  v-model="cancelApproveAdvice"
                  type="textarea"
                  :rows="4"
                  placeholder="请输入销假反馈"
                  style="position: relative;left:56px;top:6px;margin-left: 15px">
              </el-input>
            </el-col>
            <el-col :span="24" style="text-align: center;margin-top: 20px">
              <el-button
                  size="small"
                  type="primary"
                  @click="end">销假
              </el-button>
            </el-col>
          </el-form-item>
        </el-form>
      </el-dialog>
    </basic-container>
  </div>
</template>

<script>
import {EditapplycreateUserObj, particularsObj, sickadoptObj} from '@/api/leave/sick'
import {mapGetters} from 'vuex'
import {LEAVE_DETAILS, LEAVE_SEX, SICK_DETAILS, SICK_STATUS, SICK_TYPE} from '@/const/Leave'
import {PASS_DETAILS} from "@/const/Dict";

export default {
  name: 'sick',
  data() {
    return {
      activeName: 'first',
      eye:false,
      dialogEditVisible:false,
      tableData: [],
      searchForm: {},
      page: {
        total: 0, // 总页数
        currentPage: 1, // 当前页数
        pageSize: 10, // 每页显示多少条
      },
      tableLoading: false,
      name:'',
      sex:'',
      grade:'',
      building:'',
      number:'',
      gradeName:'',
      className:'',
      createUser:'',
      linkPhone:'',   //已打码手机号
      linkPhone1:'',  //未打码手机号
      createTime:'',
      leaveType:'',
      startTime:'',
      endt:'',
      endTime:'',
      leaveStatus:'',
      cause:'',
      identity:'',
      doctorApprove:'',
      doctorApproveTime:'',
      doctorApproveAdvice:'',
      cancelApproveAdvice:'',
      userOptions: [{
        value:'',
        label: '',
      }],
      value:'',
      tableOption : {
        border: true,  //竖线边框
        index: true,  //表格序号
        indexLabel: '序号',  //序号的标题
        stripe: true,  //是否显示表格的斑马条纹
        menuWidth: 120,  //操作菜单栏的宽度
        align: 'center',  //表格列对其方式
        emptyBtnText: '重置', //清空按钮文案
        searchMenuSpan: 6,  //搜索及清空等操作按钮一栏长度
        delBtn: false,  //行内删除按钮
        editBtn: false,  //行内编辑按钮
        menu: true,  //是否显示操作栏
        props: {
          label: 'label',
          value: 'value'
        },
        column: [
          {
              label: '姓名',
              prop: 'name',
              search: true,
              dicData: LEAVE_DETAILS,
          }, {
              label: '学号',
              prop: 'number',
              search: true,
              dicData: LEAVE_DETAILS,
          }, {
              label: '性别',
              prop: 'sex',
              search: true,
              type: 'select',
              dicData: LEAVE_SEX,
              change: (value) => {
                if(value.value === ''){
                  return;
                }
                this.searchForm.sex = value.value
                this.getList(this.page, this.searchForm)
              },
          }, {
            label: '校区',
            prop: 'campusDeptArea',
            dicData: PASS_DETAILS,
            editDisplay: false,
          },{
              label: '年级',
              prop: 'gradeName',
              search: false,
              type: 'select',
              dicData: LEAVE_DETAILS,
          },
          {
            label: '年级',
            prop: 'gradeId',
            search: true,
            type: 'select',
            hide: true,
            defaultExpandAll: true,
            dicUrl: '/admin/dept/PermissionTree',
            cascaderItem: ['deptName'],
            dicFormatter: (res) => {
              let gradeArr = res.data
              let value = []
              if(gradeArr.length> 0){
                for(let i of gradeArr){
                  if(i.typeNum == "2" && i.isLock === false){
                    value.push(i)
                  }
                }
                return value
              }
            },
            dicMethod: 'get',
            props: {
              label: 'name',
              value: 'id'
            },
            change: (value) => {
              this.searchForm.gradeId = value.value
              this.getList(this.page, this.searchForm)
            },
          },{
              label: '班级',
              prop: 'className',
              search: false,
              type: 'select',
              dicData: LEAVE_DETAILS,
          },
          {
            label: '班级',
            prop: 'deptName',
            search: true,
            filter: false,
            type: 'select',
            hide: true,
            defaultExpandAll: true,
            dicUrl: '/campus/sysdept/detpTree/{{key}}/1,2,3',
            dicFormatter: (res) => {
              return res.data[0].children;//返回字典的层级结构
            },
            dicMethod: 'get',
            props: {
              label: 'name',
              value: 'deptId',
            },
            change: (value) => {
              this.searchForm.deptId = value.value
              this.getList(this.page, this.searchForm)
            },
          },{
              label: '学生属性',
              prop: 'identity',
              search: true,
              type: 'select',
              dicUrl: '/campus/identity/selectAll?groupNum=2',
              dicMethod: 'get',
              props: {
                label: 'name',
                value: 'name'
              },
              change: (value) => {
                if(value.value === ''){
                  return;
                }
                this.searchForm.identity = value.value
                this.getList(this.page, this.searchForm)
              },
          },{
            label: '楼栋',
            prop: 'buildingName',
            search: true,
            type: 'select',
            slot:true,
            dicUrl: '/campus/building/selectAll',
            dicMethod: 'get',
            props: {
              label: 'buildingName',
              value: 'buildingName'
            },
            change: (value) => {
              if(value.value === ''){
                return;
              }
              this.searchForm.buildingName = value.value
              this.getList(this.page, this.searchForm)
            },
          }, {
            label: '宿舍号',
            prop: 'dormNumber',
            dicData: LEAVE_DETAILS,
            search: true,
            type: 'input',
          },
          {
            label: '请假发起人',
            prop: 'createUser',
            viewDisplay: true,
            search: false,
            dicData: LEAVE_DETAILS,
          },{
            label: '发起人电话',
            prop: 'linkPhone',
            viewDisplay: true,
            search: false,
            hide: true,
            dicData: LEAVE_DETAILS,
          },{
            label: '发起时间',
            prop: 'createTime',
            type: 'datetime',
            width: 120,
            sortable:true,
            format: 'yyyy-MM-dd HH:mm',
            valueFormat: 'yyyy-MM-dd HH:mm:ss',
            viewDisplay: true,
            search: false,
            dicData: LEAVE_DETAILS,
          },{
            label: '请假类型',
            prop: 'leaveType',
            viewDisplay: true,
            search: false,
            type: 'select',
            dicData: SICK_TYPE,
          },{
            label: '请假开始时间',
            prop: 'startTime',
            type: 'datetime',
            width: 120,
            sortable:true,
            format: 'yyyy-MM-dd HH:mm',  //显示值时间格式
            valueFormat: 'yyyy-MM-dd HH:mm:ss',  //真实值的时间格式
            viewDisplay: true,
            search: false,
            dicData: LEAVE_DETAILS,
          },{
            label: '请假结束时间',
            prop: 'endTime',
            type: 'datetime',
            width: 120,
            sortable:true,
            format: 'yyyy-MM-dd HH:mm',
            valueFormat: 'yyyy-MM-dd HH:mm:ss',
            viewDisplay: true,
            search: false,
            dicData: SICK_DETAILS,
          },{
            label: '请假事由',
            prop: 'cause',
            viewDisplay: true,
            search: false,
            hide: true,
            dicData: LEAVE_DETAILS,
          }, {
            label: '审批状态',
            prop: 'leaveStatus',
            viewDisplay: true,
            slot:true,
            search: false,
            dicData: SICK_STATUS,
          },{
            label: '审批反馈',
            prop: 'advice',
            viewDisplay: true,
            search: false,
            hide:true,
            dicData: LEAVE_DETAILS,
          },
        ]
      }
    }
  },
  computed: {
    ...mapGetters(['permissions']),
  },
  mounted() {
    this.createUserOptions();
  },
  created() {
    this.searchForm.leaveStatus = 0;
  },
  methods: {
    // 自定义排序
    sortChange(params){
      this.sortParams = {};
      let arr = params.prop.split(/(?=[A-Z])/).join("_").toLowerCase();
      if (params.order === 'ascending'){
        this.sortParams.ascs = arr;
      }else if (params.order === 'descending'){
        this.sortParams.descs = arr;
      }
      this.getList(this.page,this.sortParams)
    },

    //选项卡点击事件
    handleClick(tab, event) {
      this.searchForm.leaveStatus = tab.index
      this.getList(this.page, this.searchForm)
    },

    //手机号显隐
    showPhone() {
      let that = this;
      if(that.eye){
        that.eye = false
      }else{
        that.eye = true
      }
    },

    //通过请假方法
    adopt(){
      this.tableLoading = true
      var date = new Date();
      var year=date.getFullYear();
      /* 在日期格式中，月份是从0开始的，因此要加0
       * 使用三元表达式在小于10的前面加0，以达到格式统一  如 09:11:05
       * */
      var month= date.getMonth()+1<10 ? "0"+(date.getMonth()+1) : date.getMonth()+1;
      var day=date.getDate()<10 ? "0"+date.getDate() : date.getDate();
      var hours=date.getHours()<10 ? "0"+date.getHours() : date.getHours();
      var minutes=date.getMinutes()<10 ? "0"+date.getMinutes() : date.getMinutes();
      var seconds=date.getSeconds()<10 ? "0"+date.getSeconds() : date.getSeconds();
      // 拼接
      this.doctorApproveTime = year+"-"+month+"-"+day+" "+hours+":"+minutes+":"+seconds;
      if (this.value === ''){
        this.tableLoading = false
        this.$message.error('通过失败,请选择审批人')
        return;
      }
      let param = {
        'id':this.currentrow.id,
        'endTime':this.endt,
        'value':this.value,
        'doctorApproveAdvice':this.value+':'+this.doctorApproveAdvice,
        'doctorApprove':1,
        'doctorApproveTime':this.doctorApproveTime,
      }
      sickadoptObj(param).then(() => {
        this.getList(this.page)
        this.tableLoading = false
        this.dialogEditVisible = false
        this.$message.success('通过成功！')
        this.value = null
        this.endt = null
        this.doctorApproveAdvice = null
      })
      this.tableLoading = false
    },

    //驳回请假方法
    reject(){
      this.tableLoading = true
      var date = new Date();
      var year=date.getFullYear();
      /* 在日期格式中，月份是从0开始的，因此要加0
       * 使用三元表达式在小于10的前面加0，以达到格式统一  如 09:11:05
       * */
      var month= date.getMonth()+1<10 ? "0"+(date.getMonth()+1) : date.getMonth()+1;
      var day=date.getDate()<10 ? "0"+date.getDate() : date.getDate();
      var hours=date.getHours()<10 ? "0"+date.getHours() : date.getHours();
      var minutes=date.getMinutes()<10 ? "0"+date.getMinutes() : date.getMinutes();
      var seconds=date.getSeconds()<10 ? "0"+date.getSeconds() : date.getSeconds();
      // 拼接
      this.doctorApproveTime = year+"-"+month+"-"+day+" "+hours+":"+minutes+":"+seconds;
      if (this.value === ''){
        this.tableLoading = false
        this.$message.error('驳回失败,请选择审批人')
        return;
      }
      let param = {
        'id':this.currentrow.id,
        'endTime':this.endTime,
        'value':this.value,
        'doctorApproveAdvice':this.value+':'+this.doctorApproveAdvice,
        'doctorApprove':2,
        'doctorApproveTime':this.doctorApproveTime,
      }
      sickadoptObj(param).then(() => {
        this.getList(this.page)
        this.tableLoading = false
        this.dialogEditVisible = false
        this.$message.success('驳回成功！')
        this.value = null
        this.endTime = null
        this.doctorApproveAdvice = null
      })
      this.tableLoading = false
    },

    //销假方法
    end(){
      this.tableLoading = true
      var date = new Date();
      var year=date.getFullYear();
      /* 在日期格式中，月份是从0开始的，因此要加0
       * 使用三元表达式在小于10的前面加0，以达到格式统一  如 09:11:05
       * */
      var month= date.getMonth()+1<10 ? "0"+(date.getMonth()+1) : date.getMonth()+1;
      var day=date.getDate()<10 ? "0"+date.getDate() : date.getDate();
      var hours=date.getHours()<10 ? "0"+date.getHours() : date.getHours();
      var minutes=date.getMinutes()<10 ? "0"+date.getMinutes() : date.getMinutes();
      var seconds=date.getSeconds()<10 ? "0"+date.getSeconds() : date.getSeconds();
      // 拼接
      this.doctorApproveTime = year+"-"+month+"-"+day+" "+hours+":"+minutes+":"+seconds;
      if (this.value === ''){
        this.tableLoading = false
        this.$message.error('销假失败,请选择销假人')
        return;
      }
      let param = {
        'id':this.currentrow.id,
        'endTime':this.doctorApproveTime,
        'value':this.value,
        'doctorApproveAdvice':this.doctorApproveAdvice+'\n'+this.value+'：销假'+'\n'+this.cancelApproveAdvice,
        'leaveStatus': 4,
      }
      sickadoptObj(param).then(() => {
        this.getList(this.page)
        this.tableLoading = false
        this.dialogEditVisible = false
        this.$message.success('销假成功！')
        this.value = null
        this.endTime = null
        this.doctorApproveAdvice = null
      })
      this.tableLoading = false
    },

    //获取所有的校医身份数据
    createUserOptions(){
      let param = {
        'identityName':'校医',
      }
      EditapplycreateUserObj(param).then(res => {
        if (res.data.code === 0) {
          this.userData = res.data.data;
          console.log(this.userData)
          this.userOptions = this.userData.map(item => {
            return {value:`${item.name}`,label: `${item.name}`};
          })
          console.log(this.userOptions)
        }
      });
    },

    //查看弹窗
    handle: function (row) {
      this.dialogEditVisible = true
      this.currentrow = row
      this.createUser = row.$createUser
      this.createTime = row.$createTime
      this.leaveType = row.$leaveType
      this.startTime = row.$startTime
      this.endTime = row.$endTime
      this.name = row.name
      this.sex = row.sex
      this.number = row.number
      this.gradeName = row.gradeName
      this.className = row.className
      this.linkPhone = row.linkPhone
      this.linkPhone1 = row.linkPhone1
      this.cause = row.cause
      this.identity = row.identity
      this.doctorApprove = row.doctorApprove
      this.doctorApproveAdvice = row.doctorApproveAdvice
      this.doctorApproveTime = row.doctorApproveTime
      this.leaveStatus = row.$leaveStatus
    },

    //关闭弹窗
    dictItemVisible: function () {
      this.dialogEditVisible = false
      this.eye = false
    },


    //展示表格
    getList(page, params) {
      this.tableLoading = true
      let value = this.searchForm.leaveStatus
      particularsObj(Object.assign({
        current: page.currentPage,
        size: page.pageSize,
        leaveType:1,
        leaveStatus:value,
      }, params, this.searchForm,this.sortParams)).then(response => {
        this.tableData = response.data.data.records
        for(var i=0; i<response.data.data.records.length; i++) {
          let phone =  response.data.data.records[i].linkPhone
          let newphone = phone.replace(/^(.{3})(?:\d+)(.{4})$/,"\$1****\$2");  //手机号打码正则
          response.data.data.records[i].linkPhone = newphone  //已打码
          response.data.data.records[i].linkPhone1 = phone    //未打码
        }
        this.page.total = response.data.data.total
        this.tableLoading = false
      })
    },

    //搜索页面内容
    searchChange(form, done) {
      let value = this.searchForm.leaveStatus
      if (form.deptName !== undefined) {
        form.deptId = form.deptName
        this.getList(this.page, form)
        done()
      }
      this.searchForm = form
      this.searchForm.leaveStatus = value
      this.page.currentPage = 1
      this.getList(this.page, form)
      done()
    },

    //点击每页多少条会调size-change方法回调
    sizeChange(size) {
      this.page.pageSize = size
    },

    //点击页码会调用current-change方法回调当前页
    currentChange(current) {
      this.page.currentPage = current
    },

    //清空时重置页面
    searchReset(){
      let value = this.searchForm.leaveStatus
      this.searchForm={}
      this.searchForm.leaveStatus = value
      this.getList(this.page,this.searchForm)
    }
  }
}
</script>
<style scoped>
/deep/ .avue-crud__menu {
  display: none;
}

/deep/ .el-form-item__label {
  text-align: left;
}

/deep/ .avue-form__row {
  padding-left: 2px !important;
  padding-right: 36px !important;
}

/deep/ .avue-form__menu--center {
  text-align: left;
}
</style>
